package net.huashitong.ssydt.provider.pk.service;

import net.huashitong.ssydt.base.service.LongService;
import net.huashitong.ssydt.pk.entity.SsPkYmdxMyRank;

import java.util.List;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.12.13
 */
public interface SsPkYmdxMyRankService extends LongService<SsPkYmdxMyRank> {

    /**
     * 获取我的排名（自动更新本轮排名）
     *
     * @param matchRecordId
     * @param userId
     * @return
     */
    SsPkYmdxMyRank getAutoUpdateRankByMatchRecordIdWithUserId(Long matchRecordId, String userId);

    /**
     * 获取我的排名(自动加载上轮排名)
     *
     * @param matchRecordId
     * @param userId
     * @return
     */
    SsPkYmdxMyRank getAutoLoadLastRankByMatchRecordIdWithUserId(Long matchRecordId, String userId);

    /**
     * 更新排行
     *
     * @param ssPkYmdxMyRank
     * @return
     */
    SsPkYmdxMyRank updateRank(SsPkYmdxMyRank ssPkYmdxMyRank);

    SsPkYmdxMyRank getByMatchRecordIdWithUserId(Long matchRecordId, String userId);

    List<SsPkYmdxMyRank> findHighestScoreDescByMatchRecordId(Long matchRecordId);
}
